package com.controller;

import com.base.BasePageReq;
import com.base.BasePageRes;
import com.req.ArticalPageReq;
import com.service.HomeServie;
import com.util.common.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private HomeServie homeServie;
    @PostMapping("/queryPage")
    @ApiOperation("文章分页查询")
    public R<BasePageRes> queryPage(@RequestBody BasePageReq pageReq){

        return R.ok(homeServie.queryPage(pageReq));
    }
}
